#pragma once
class IVisitor;

class IUIElement
{
public:
    //分发;
    virtual void accept(IVisitor& visitor) = 0;
};

class IVisitor
{
public:
    virtual void VisitorElement(IUIElement* pElement) = 0;
    //virtual void VisitorElement(QWidget* pElement) = 0;
};

enum EnumMainStatus
{
    emMainStatus_All,    //整体显示;
    emMainStatus_Mod     //模式显示;
};

class IUIMainStatus
{
public:
    //设置界面指针;
    IUIMainStatus(IUIElement* pElement) { m_pUIElement = pElement; };
    virtual ~IUIMainStatus() {};


    //显示界面前;
    virtual void PreDisplay() = 0;

    //显示界面;
    virtual void Display() = 0;

    //显示界面后;
    virtual void AfterDisplay() = 0;

    //显示运行结果;
    virtual void DisplayRun() = 0;

    //获取界面类型;
    virtual EnumMainStatus GetMainStatus() { return  m_emMainStatus; };

protected:
    
    //显示的界面;
    IUIElement* m_pUIElement;

    //主界面状态;
    EnumMainStatus m_emMainStatus;
};

class IUIModStatus
{
public:
    IUIModStatus() {};
    virtual ~IUIModStatus() {};

    //设置界面指针;
    IUIModStatus(IUIElement* pElement) { m_pUIElement = pElement; };

    //显示界面前;
    virtual void PreDisplay() = 0;

    //显示界面;
    virtual void Display() = 0;

    //显示界面后;
    virtual void AfterDisplay() = 0;

protected:

    //显示的界面;
    IUIElement* m_pUIElement;

};
